import {request} from "@/utils/request";

// 根据筛选条件查询用户列表
export function getUserList(data) {
    return request({
      url: '/user/list',
      method: 'get',
      params: data
    })
  }
//角色列表
  export function roleList() {
    return request({
      url: '/role/list?_page=1&_limit=100000',
      method: 'get',
    })
  }
//新增员工
  export function staff(data) {
    return request({
      url: '/user',
      method: 'post',
      data
    })
  }
  //修改员工
  export function staffPut(data) {
    return request({
      url: '/user',
      method: 'put',
      data
    })
  }
//禁用启用员工
  export function enable(id) {
    return request({
      url: '/user/enable?id='+id,
      method: 'PUT',
    })
  }
  //删除员工
  export function staffDel(id) {
    return request({
      url: '/user?id='+id,
      method: 'DELETE',
    })
  }

    //获取员工数据
    export function staffDetail(id) {
      return request({
        url: '/user?id='+id,
        method: 'get',
      })
    }
  
    //修改员工密码
    export function staffPassChange(data) {
      return request({
        url: '/user',
        method: 'put',
        data
      })
    }
    


 